<h1><?php print( $h1 ); ?></h1>
<?php
//@todo: load by domain -> website
$templatepath = "template/trassenheide/";
?>
<div class="events">
<table width="528" border="0" cellpadding="0" cellspacing="0" class="Rah01">
	<tr> 
	    <th width="176" height="30" valign="top">Veranstaltung</th>
	    <th width="176" height="30" valign="top">Ort</th>
	    <th width="176" valign="top">Zeit</th>
	</tr>
<?php
$count = 0;
if( !empty( $text ) ){
	foreach( $text as $key => $value ){
		$start = explode( ' ', $value['start_date'] );
		$date = explode( '-', $start[0] );
		$time = explode( ':', $start[1] );
		?>
		<tr>
		    <td width="176" height="30" valign="top" <?php if( ( $count % 2 ) != 0 ) { echo 'class="odd"'; }?>>
		    	<span class="LesTexFe">
		    		<?php echo $value['weekday'] . " " . $date[2] . "." . $date[1] . "." . $date[0]; ?><br />
		    		<?php echo $value['title']; ?>
		    	</span>
		    	(<?php echo $value['short_description']; ?>)
		    </td>
		    <td width="176" height="30" valign="top" <?php if( ( $count % 2 ) != 0 ) { echo 'class="odd"'; }?>>
		    	<span class="LesTexFe"><?php echo $value['event_location']; ?></span>
		    </td>
		    <td width="176" valign="top" <?php if( ( $count % 2 ) != 0 ) { echo 'class="odd"'; }?>>
		    	<?php echo $time[0] . "." . $time[1]; ?> Uhr
		    </td>    
		</tr>
		<?php 
		$count++;
	}
}
?>
</table>
</div>